$(document).ready(function(){
	
	Invitesq.GroupModel = Backbone.Model.extend({});
	
	Invitesq.GroupView = Backbone.View.extend({
		el: '#group',
		
		events: {
			'click #group-btn': 'createGroup'
		},
		
		createGroup: function() {
			group = new Invitesq.GroupModel({
				participants: this.$('#friend-id').val()
			});
			console.log(group.toJSON());
			$.post('/api/group/create/', group.toJSON(), function(data){
				console.log(data);
			});
			
		}
	});
	
	Invitesq.groupView = VM.createView('groupView', function(){
		return new Invitesq.GroupView();
	});
});
